<!DOCTYPE html>
<html>
  <head>
    <title><%= title %></title>
    <link rel='stylesheet' href='/stylesheets/style.css' />
  </head>
  <body>
    <h1><%= title %></h1>
    <p>EJS Welcome to <%= title %></p>
  </body>
  <script>
    let btn = document. queryselector("#btn");
    btn.onclick = function(){
        fetch("http://localhost:300@/chapter",{
          method:"POST",
          body: JSoN.stringify({
            username:"zhangsan",
            age: 20
          })
        }).then(res => res.json())
        .then(result =>{
          console.log(result);
        })
      }
  </script>
</html>
